<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: c
  Date: 2017-11-07
  Time: 16:17
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <link rel="stylesheet" href="${ctx}/statics/moban/plugins/layui/css/layui.css" media="all" />
    <link rel="stylesheet" href="${ctx}/statics/moban/css/global.css" media="all">
    <link rel="stylesheet" type="text/css" href="http://www.jq22.com/jquery/font-awesome.4.6.0.css">
    <style>
        body a{
            text-decoration: none;

        }
    </style>
</head>
<body>
<div class="layui-layout layui-layout-admin">
    <div class="layui-header header header-demo" >
        <div class="layui-main">
            <div class="admin-login-box">
                <a class="logo" style="left: 0;" href="#">
                    <span style="font-size: 22px;">BeginnerAdmin</span>
                </a>
                <div class="admin-side-toggle">
                    <i class="fa fa-bars" style="line-height: 30px;" aria-hidden="true"></i>
                </div>
            </div>
            <ul class="layui-nav admin-header-item">
                <li class="layui-nav-item" >
                    <a href="user/email/index"  target="content">
                        <i class="fa fa-envelope fa-fw"></i>
                        <i class="material-icons right">&nbsp;</i>
                    </a>
                </li>
                <li class="layui-nav-item">
                    <a href="javascript:;" class="admin-header-user">
                        <img src="${ctx}/statics/moban/images/0.jpg" />
                        <span>${sessionScope.loginUser.woName}</span>
                    </a>
                    <dl class="layui-nav-child">
                        <%--<dd>
                            <a href="user/user/index"><i class="fa fa-user" aria-hidden="true"></i> 个人信息</a>
                        </dd>--%>
                        <%--<dd>
                            <a href="javascript:;"><i class="fa fa-gear" aria-hidden="true"></i> 设置</a>
                        </dd>--%>
                        <%--<dd>
                            <a href="javascript:;" onclick="updatePwd()"><i class="fa fa-info" aria-hidden="true"></i> 修改密码</a>
                        </dd>--%>
                        <dd>
                            <a href="${ctx}/close"><i class="fa fa-sign-out" aria-hidden="true"></i> 注销</a>
                        </dd>
                    </dl>
                </li>
            </ul>
        </div>
    </div>
    <div class="layui-side layui-bg-black" id="admin-side">
        <div class="layui-side-scroll" id="admin-navbar-side" lay-filter="side">
            <ul class="layui-nav layui-nav-tree beg-navbar">
                <c:forEach items="${menus}" var="entry">
                    <li class="layui-nav-item">
                        <a href="javascript:;">
                            <i class="${entry.key.iconSkin}" aria-hidden="true" data-icon="fa-cubes"></i>
                            <cite>${entry.key.name}</cite>
                            <span class="layui-nav-more"></span>
                        </a>
                        <dl class="layui-nav-child">
                            <c:forEach items="${entry.value}" var="m">
                                <dd>
                                    <a href="${m.url}" target="content">&nbsp;<i class="${m.iconSkin}"></i><cite>${m.name}</cite></a>
                                </dd>
                            </c:forEach>
                        </dl>
                    </li>
                </c:forEach>
            </ul>
        </div>
    </div>
    <div class="layui-body" style="bottom: 0;border-left: solid 2px #1AA094;" id="admin-body">
        <div class="layui-tab admin-nav-card layui-tab-brief" lay-filter="admin-tab">

            <div class="layui-tab-content" style="min-height: 150px; padding: 5px 0 0 0;">
                <div class="layui-tab-item layui-show">
                    <iframe name="content" id="kuangjia" width="100%" height="100%" scrolling="yes" frameborder="0"></iframe>
                </div>
            </div>
        </div>
    </div>
    <input type="hidden" name="roleId" value="${sessionScope.loginUser.roleId}">
    <div class="layui-footer footer footer-demo" id="admin-footer">
        <div class="layui-main">
            <p>2016 &copy;
                <a href="#">beginner.zhengjinfan.cn</a> LGPL license
            </p>
        </div>
    </div>
    <div class="site-tree-mobile layui-hide">
        <i class="layui-icon">&#xe602;</i>
    </div>
    <div class="site-mobile-shade"></div>
    <!--锁屏模板 start-->
    <script type="text/template" id="lock-temp">
        <div class="admin-header-lock" id="lock-box">
            <div class="admin-header-lock-img">
                <img src="images/0.jpg"/>
            </div>
            <div class="admin-header-lock-name" id="lockUserName">beginner</div>
            <input type="text" class="admin-header-lock-input" value="输入密码解锁.." name="lockPwd" id="lockPwd"/>
            <button class="layui-btn layui-btn-small" id="unlock">解锁</button>
        </div>
    </script>
    <!--锁屏模板 end -->
    <script type="text/javascript" src="${ctx}/statics/js/jquery-1.12.4.js"></script>
    <script type="text/javascript" src="${ctx}/statics/moban/plugins/layui/layui.js"></script>
    <script type="text/javascript" src="${ctx}/statics/moban/datas/nav.js"></script>
    <script type="text/javascript" src="${ctx}/statics/moban/js/navbar.js"></script>
    <script src="${ctx}/statics/moban/js/index.js"></script>
    <script>
        layui.use('layer', function() {
            var $ = layui.jquery,
                layer = layui.layer;

            $('#video1').on('click', function() {
                layer.open({
                    title: 'YouTube',
                    maxmin: true,
                    type: 2,
                    content: 'video.html',
                    area: ['800px', '500px']
                });
            });

        });
        if($("[name=roleId]").val()==1){
            $("#kuangjia").attr("src","statis/drugjinxiao/index")
        }else{
            $("#kuangjia").attr("src","sys/main/index")
        }
    </script>
</div>
</body>
</html>
